+/- todo, improve argument handling

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-16 18:26:18 +02:00
parent 6485299a7c
commit 5cefeb25fc
2 changed files with 23 additions and 17 deletions

View file

@ -434,6 +434,7 @@ class Cdist:
env = os.environ.copy()
env['PATH'] = self.bin_dir + ":" + env['PATH']
# Information required in every manifest
env['__target_host'] = self.target_host
env['__global'] = self.out_dir
@ -630,10 +631,19 @@ def emulator():
# And finally verify parameter
args = parser.parse_args(sys.argv[1:])
# Record parameter
# wh
object_id = args.object_id
del args.object_id
print(args)
# Record parameter
params = vars(args)
for param in params:
value = getattr(args, param)
if value:
print("Writing " + param + " = " + value)
# Record requirements
if "__require" in os.environ:
requirements = os.environ['__require']

View file

@ -1,3 +1,14 @@
- Rewrite cdist-type-emulator
- Remove legacy code in cdist
- Remove cdist-config
- Remove man1/cdist-type-emulator.text
- Remove the PATH=... part from the README
- how to access output dir?
Test:
__cdist_type_base_dir=$(pwd -P)/conf/type __file
- Initial install support
- setup $__install = "yes" for
manifest(s), gencode-*
@ -18,21 +29,6 @@
- and maximum number of parallel runs (-p X)
- error handling / report failed hosts
- Rewrite cdist-type-emulator
- Remove legacy code in cdist
- Remove cdist-config
- Remove man1/cdist-type-emulator.text
- Remove the PATH=... part from the README
- basename(argv0) == type
- how to get to type dir?
- dependent on -c to cdist!
- submit via internal env!
- need to build parameter parser
Test:
__cdist_type_base_dir=$(pwd -P)/conf/type __file
- Allow manifest to be read from stdin
- Create new video for cdist 2.0.0
http://www.youtube.com/watch?v=PRMjzy48eTI