Merge "ci: Rename ssh key"

This commit is contained in:
Jenkins 2017-03-28 18:29:42 +00:00 committed by Gerrit Code Review
commit bdeb6b9c15
2 changed files with 6 additions and 4 deletions

View File

@ -27,9 +27,9 @@ PRIVATE_KEY=
echo "If private key is specified, save to temp and use that; else, use default"
if [[ "$KEYPAIR" == "default" ]]; then
PRIVATE_KEY=$(readlink -f ~/.ssh/id_rsa)
PRIVATE_KEY=$(readlink -f ~/.ssh/id_rsa_magnum)
else
PRIVATE_KEY="$(mktemp id_rsa.$SSH_IP.XXX)"
PRIVATE_KEY="$(mktemp id_rsa_magnum.$SSH_IP.XXX)"
echo -en "$KEYPAIR" > $PRIVATE_KEY
fi

View File

@ -106,8 +106,10 @@ EOF
# Create a keypair for use in the functional tests.
echo_summary "Generate a key-pair"
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
openstack keypair create --public-key ~/.ssh/id_rsa.pub default
# ~/.ssh/id_rsa already exists in multinode setup, so generate
# key with different name
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa_magnum
openstack keypair create --public-key ~/.ssh/id_rsa_magnum.pub default
}
function add_flavor {