-
Committer:
Scott Moser
-
Date:
2010-02-26 14:30:17 UTC
-
Revision ID:
smoser@ubuntu.com-20100226143017-eysuequlr4u0lymm
2 changes here regarding euca2ools.setup_environ (LP: #526591)
1. use a loop rather than a list of each variable for copying
from os.environ to self.environ
2. let bash parse the eucarc file. Eucarc file is bash syntax
This change makes bash parse the file and cleanly write the output.
It allows for any file that is valid bash syntax, not limited to
the previous parsers limitations.
The bash invocation ends up looking something like:
/bin/bash -ec '. /home/smoser/.eucarc >/dev/null;
printf "%s\0%s\0%s\0%s\0%s\0%s\0%s\0%s\0" \
"${EC2_ACCESS_KEY}" "${EC2_SECRET_KEY}" "${S3_URL}" "${EC2_URL}" \
"${EC2_CERT}" "${EC2_PRIVATE_KEY}" "${EUCALYPTUS_CERT}" \
"${EC2_USER_ID}"'