Matteo Scandolo | aca8665 | 2017-08-08 13:05:27 -0700 | [diff] [blame^] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Scott Baker | 761e106 | 2016-06-20 17:18:17 -0700 | [diff] [blame] | 17 | #!/usr/bin/env python |
| 18 | import os |
| 19 | import sys |
| 20 | |
| 21 | sys.path.append("../..") |
Sapan Bhatia | 506d179 | 2017-01-24 19:32:59 +0100 | [diff] [blame] | 22 | import synchronizers.base.ansible_helper |
Scott Baker | 761e106 | 2016-06-20 17:18:17 -0700 | [diff] [blame] | 23 | |
| 24 | print sys.argv |
| 25 | |
| 26 | private_key="""-----BEGIN RSA PRIVATE KEY----- |
| 27 | MIIEpQIBAAKCAQEAtJiuarud5S4Y2quDeWyaS0UCQGQtfuSzzNhplFwujYnJGL65 |
| 28 | e14REtv+UuHGymyr/SfkTrBd8vH5NI2UZ/4sZW13ieI/1d97OeVe2+ct0Y4BaFEI |
| 29 | 3Hja6DIpsY3Q2cBQsWUwcQzbMIF9jIq8SzwR1zk8UtZi09fNxqjCchRPlBvbiLKX |
| 30 | g0/yirN237WbaKzK++8EPy3nuv83216MXHFFSjuxfICe/RhjaqMzVp7isSbv1suU |
| 31 | geyvNNzU71c/K13gTggdcIXeRQBiJYio2Sn3h2nsV6AFqFH4fjERxWG55Q4e3jeE |
| 32 | tWM/Dw+hqYKg/25UcmM862a6sUmuDCmM5S3VEQIDAQABAoIBACH88iZoNOki6c6N |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K5uRT8caPpJ+Wcp4TUdPi3BVA2MOHVDyEJg3AH/D1+DL/IgGQ/JcwOHsKt61iLhO |
| 49 | EBXj5zECgYEAk+HuwksUPkSxg/AiJGbapGDK6XGymEUzo2duWlnofRqGcZ3NT3bB |
| 50 | /kDI1KxQdlpODXSi4/BuTpbQiFOrzcEq5e5ytoMxlCHh3Fl3Jxl+JlgO21vAUvP6 |
| 51 | 4SET7Q/6LxmfBlCVRg0dXDwcfJLgbnWxyvprIcz4e0FSFVZTBs/6tFk= |
| 52 | -----END RSA PRIVATE KEY----- |
| 53 | """ |
| 54 | |
| 55 | observer.ansible.run_template_ssh("test.yaml", |
| 56 | {"instance_name": "onlab_test405-378", |
| 57 | "instance_id": "instance-0000004d", |
| 58 | "hostname": "node67.washington.vicci.org", |
| 59 | "private_key": private_key}) |
| 60 | |