summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Irnich <tim.irnich@ericsson.com>2016-07-14 09:14:31 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-14 09:14:31 +0000
commit95252994f4b1ff4369c49ce4ef024469d8b6df7d (patch)
tree781855dc1745f71be3ce1f3fe666c11e535e0e9a
parentd118ba357ece52c37e03d26ed114ec59f57c2ca5 (diff)
parente578599e6e202d9a1e572a8c2b66a5ddd6b61a6c (diff)
Merge "Fix testcase2"
-rw-r--r--test/functest/id_rsabin0 -> 426 bytes
-rw-r--r--test/functest/testcase_2.py32
2 files changed, 15 insertions, 17 deletions
diff --git a/test/functest/id_rsa b/test/functest/id_rsa
new file mode 100644
index 0000000..d590406
--- /dev/null
+++ b/test/functest/id_rsa
Binary files differ
diff --git a/test/functest/testcase_2.py b/test/functest/testcase_2.py
index 4a51111..76757d6 100644
--- a/test/functest/testcase_2.py
+++ b/test/functest/testcase_2.py
@@ -164,11 +164,26 @@ def create_instance(nova_client,
# Retrieve IP of INSTANCE
# instance_ip = instance.networks.get(network_id)[0]
+ logger.debug("Adding '%s' to security group '%s'..."
+ % (name, SECGROUP_NAME))
+ os_utils.add_secgroup_to_instance(nova_client, instance.id, sg_id)
+
+ return instance
+
+def generate_userdata_common():
+ return ("#!/bin/sh\n"
+ "sudo mkdir -p /home/cirros/.ssh/\n"
+ "sudo chown cirros:cirros /home/cirros/.ssh/\n"
+ "sudo chown cirros:cirros /home/cirros/id_rsa\n"
+ "mv /home/cirros/id_rsa /home/cirros/.ssh/\n"
"sudo echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgnWtSS98Am516e"
"stBsq0jbyOB4eLMUYDdgzsUHsnxFQCtACwwAg9/2uq3FoGUBUWeHZNsT6jcK9"
"sCMEYiS479CUCzbrxcd8XaIlK38HECcDVglgBNwNzX/WDfMejXpKzZG61s98rU"
"ElNvZ0YDqhaqZGqxIV4ejalqLjYrQkoly3R+2k= "
+ "cirros@test1>/home/cirros/.ssh/authorized_keys\n"
+ "sudo chown cirros:cirros /home/cirros/.ssh/authorized_keys\n"
+ "chmod 700 /home/cirros/.ssh\n"
"chmod 644 /home/cirros/.ssh/authorized_keys\n"
"chmod 600 /home/cirros/.ssh/id_rsa\n"
)
@@ -461,20 +476,3 @@ def main():
if __name__ == '__main__':
main()
-
- "cirros@test1>/home/cirros/.ssh/authorized_keys\n"
- "sudo chown cirros:cirros /home/cirros/.ssh/authorized_keys\n"
- "chmod 700 /home/cirros/.ssh\n"
- "sudo chown cirros:cirros /home/cirros/.ssh/\n"
- "sudo chown cirros:cirros /home/cirros/id_rsa\n"
- "mv /home/cirros/id_rsa /home/cirros/.ssh/\n"
-def generate_userdata_common():
- return ("#!/bin/sh\n"
- "sudo mkdir -p /home/cirros/.ssh/\n"
- return instance
-
-
- logger.debug("Adding '%s' to security group '%s'..."
- % (name, SECGROUP_NAME))
- os_utils.add_secgroup_to_instance(nova_client, instance.id, sg_id)
-