|
122 | 122 | """, |
123 | 123 | 'keys:remove': """Usage: deis keys:remove <key> |
124 | 124 | """, |
125 | | - 'layers:create': """Usage: deis layers:create <id> <flavor> --run_list=<run_list> [options] |
| 125 | + 'layers:create': """Usage: deis layers:create <id> <flavor> [options] |
126 | 126 |
|
127 | 127 | Chef Options: |
128 | 128 |
|
@@ -700,12 +700,18 @@ def layers_create(self, args): |
700 | 700 | formation = args.get('--formation') |
701 | 701 | if not formation: |
702 | 702 | formation = self._session.formation |
703 | | - body = {'id': args['<id>'], 'flavor': args['<flavor>'], 'run_list': args['--run_list']} |
704 | | - for opt in ('--environment', '--initial_attributes', |
| 703 | + body = {'id': args['<id>'], 'flavor': args['<flavor>']} |
| 704 | + for opt in ('--environment', '--initial_attributes', '--run_list', |
705 | 705 | '--ssh_username', '--ssh_private_key', '--ssh_public_key'): |
706 | 706 | o = args.get(opt) |
707 | 707 | if o: |
708 | 708 | body.update({opt.strip('-'): o}) |
| 709 | + # provide default run_list for runtime and proxy |
| 710 | + if not 'run_list' in body: |
| 711 | + if body['id'] == 'runtime': |
| 712 | + body['run_list'] = 'recipe[deis],recipe[deis::runtime]' |
| 713 | + elif body['id'] == 'proxy': |
| 714 | + body['run_list'] = 'recipe[deis],recipe[deis::proxy]' |
709 | 715 | sys.stdout.write('Creating {} layer... '.format(args['<id>'])) |
710 | 716 | sys.stdout.flush() |
711 | 717 | response = self._dispatch('post', '/api/formations/{}/layers'.format(formation), |
|
0 commit comments